﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
namespace Langben.DAL
{
    [MetadataType(typeof(DepositorMetadata))]//使用DepositorMetadata对Depositor进行数据验证
    public partial class Depositor : IBaseEntity
    {
      
        #region 自定义属性，即由数据实体扩展的实体
        
        [Display(Name = "BuyerId")]
        public string BuyerIdOld { get; set; }
        
        #endregion

    }

    public class DepositorMetadata
    {
        [ScaffoldColumn(false)]
        [Display(Name = "唯一标识", Order = 1)]
        public object RowGuid { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "是否寄存", Order = 2)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object IsDeposit { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "寄存位", Order = 3)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object ADDRESS { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "主办人", Order = 4)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object BuyerId { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "与主办人关系", Order = 5)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object RelationshipWithBuyer { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "性别", Order = 6)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object Sex { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "籍贯", Order = 7)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object NativePlace { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "出生日期", Order = 8)]
        [DataType(System.ComponentModel.DataAnnotations.DataType.DateTime, ErrorMessage = "时间格式不正确")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

        public DateTime? Birthdate { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "逝世日期", Order = 9)]
        [DataType(System.ComponentModel.DataAnnotations.DataType.DateTime, ErrorMessage = "时间格式不正确")]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:d}")]

        public DateTime? Deathdate { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "年龄", Order = 10)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object Age { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "生前地址", Order = 11)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object AliveAddress { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "生前职务", Order = 12)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object AliveJob { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "落葬人照片", Order = 13)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object Photo { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "生平简介", Order = 14)]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        public object Introduction { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "备注", Order = 15)]
        [StringLength(4000, ErrorMessage = "长度不可超过4000")]
        public object Remark { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建时间", Order = 16)]
        [DataType(System.ComponentModel.DataAnnotations.DataType.DateTime, ErrorMessage = "时间格式不正确")]
        public DateTime? CreateTime { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "创建人", Order = 17)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object CreatePerson { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "死亡证编号", Order = 18)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object DeathCertificatesId { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "姓名", Order = 19)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object Name { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "寄存位名称", Order = 20)]
        [StringLength(200, ErrorMessage = "长度不可超过200")]
        public object AddressName { get; set; }

        [ScaffoldColumn(true)]
        [Display(Name = "寄存位唯一标识", Order = 21)]
        [StringLength(50, ErrorMessage = "长度不可超过50")]
        public object AddressId { get; set; }




    }


}

